home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / bbsutil / bsrc_250.zip / OUTBOUND.C < prev    next >
Text File  |  1991-09-15  |  13KB  |  376 lines

  1. /*--------------------------------------------------------------------------*/
  2. /*                                                                          */
  3. /*                                                                          */
  4. /*      ------------         Bit-Bucket Software, Co.                       */
  5. /*      \ 10001101 /         Writers and Distributors of                    */
  6. /*       \ 011110 /          Freely Available<tm> Software.                 */
  7. /*        \ 1011 /                                                          */
  8. /*         ------                                                           */
  9. /*                                                                          */
  10. /*  (C) Copyright 1987-91, Bit Bucket Software Co., a Delaware Corporation. */
  11. /*                                                                          */
  12. /*                                                                          */
  13. /*            This module was originally written by Bob Hartman             */
  14. /*                                                                          */
  15. /*                                                                          */
  16. /*                         Outbound Manipulating                            */
  17. /*                                                                          */
  18. /*                                                                          */
  19. /*    For complete  details  of the licensing restrictions, please refer    */
  20. /*    to the License  agreement,  which  is published in its entirety in    */
  21. /*    the MAKEFILE and BT.C, and also contained in the file LICENSE.250.    */
  22. /*                                                                          */
  23. /*    USE  OF THIS FILE IS SUBJECT TO THE  RESTRICTIONS CONTAINED IN THE    */
  24. /*    BINKLEYTERM  LICENSING  AGREEMENT.  IF YOU DO NOT FIND THE TEXT OF    */
  25. /*    THIS  AGREEMENT IN ANY OF THE  AFOREMENTIONED FILES,  OR IF YOU DO    */
  26. /*    NOT HAVE THESE FILES,  YOU  SHOULD  IMMEDIATELY CONTACT BIT BUCKET    */
  27. /*    SOFTWARE CO.  AT ONE OF THE  ADDRESSES  LISTED BELOW.  IN NO EVENT    */
  28. /*    SHOULD YOU  PROCEED TO USE THIS FILE  WITHOUT HAVING  ACCEPTED THE    */
  29. /*    TERMS  OF  THE  BINKLEYTERM  LICENSING  AGREEMENT,  OR  SUCH OTHER    */
  30. /*    AGREEMENT AS YOU ARE ABLE TO REACH WITH BIT BUCKET SOFTWARE, CO.      */
  31. /*                                                                          */
  32. /*                                                                          */
  33. /* You can contact Bit Bucket Software Co. at any one of the following      */
  34. /* addresses:                                                               */
  35. /*                                                                          */
  36. /* Bit Bucket Software Co.        FidoNet  1:104/501, 1:343/491             */
  37. /* P.O. Box 460398                AlterNet 7:491/0                          */
  38. /* Aurora, CO 80046               BBS-Net  86:2030/1                        */
  39. /*                                Internet f491.n343.z1.fidonet.org         */
  40. /*                                                                          */
  41. /* Please feel free to contact us at any time to share your comments about  */
  42. /* our software and/or licensing policies.                                  */
  43. /*                                                                          */
  44. /*--------------------------------------------------------------------------*/
  45.  
  46. /* Include this file before any other includes or defines! */
  47.  
  48. #include "includes.h"
  49.  
  50. int add_request (char *, char *, char *, char *);
  51. int add_send (char *, char *, char *);
  52. int kill_node (char *);
  53.  
  54. int Overlay_Do_Get (BINK_SAVEP p, int x)
  55. {
  56. #ifndef MILQ
  57.     REGIONP r;
  58.     char node[51];
  59.     char file[13];
  60.     char password[9];
  61.     char flavor[2];
  62.     char sure[2];
  63. #endif
  64.  
  65. #ifndef MILQ
  66.     if (p != NULL)
  67.         {
  68.         r = p->region;
  69.  
  70.         /* First fill it all with blanks */
  71.         sb_fill (r, ' ', colors.popup);
  72.  
  73.         /* Now draw the box */
  74.         sb_box (r, boxtype, colors.popup);
  75.  
  76.         sb_move (r, 0, 1);
  77.         sb_puts (r, MSG_TXT(M_GET_FILE));
  78.  
  79.         /* Now do the fields */
  80.         sb_move (r, 1,2);
  81.         sb_puts (r, MSG_TXT(M_ADDRESS_TO_GET_FROM));
  82.         if (!sb_input_chars (r, 1, 23, node, 36))
  83.             {
  84.             sb_move (r, 2, 2);
  85.             sb_puts (r, MSG_TXT(M_FILE_TO_RECEIVE));
  86.             if (!sb_input_chars (r, 2, 23, file, 12))
  87.                 {
  88.                 sb_move (r, 3, 2);
  89.                 sb_puts (r, MSG_TXT(M_PASSWORD_TO_USE));
  90.                 (void) sb_input_chars (r, 3, 23, password, 8);
  91.                 sb_move (r, 4, 2);
  92.                 sb_puts (r, "Crash, Hold, Direct, Normal (C/H/D/N)?");
  93.                 (void) sb_input_chars (r, 4, 41, flavor, 1);
  94.                 sb_move (r, 5, 2);
  95.                 sb_puts (r, MSG_TXT(M_ARE_YOU_SURE));
  96.                 (void) sb_input_chars (r, 5, 23, sure, 1);
  97.                 if (sure[0] == (char)toupper (MSG_TXT(M_YES)[0]))
  98.                     x = add_request (node, file, password, flavor);
  99.                 }
  100.             }
  101.         }
  102. #else
  103.     DialogBox( MilqueRsrc, (LPSTR)"Get", MilqueMailerWnd, GetDlgPrc );
  104. #endif
  105.     /* Return value is never checked, just use x so lint and -W3 don't get mad */
  106.     return (x);
  107. }
  108.  
  109. int Overlay_Do_Send (BINK_SAVEP p, int x)
  110. {
  111. #ifndef MILQ
  112.     REGIONP r;
  113.     char node[51];
  114.     char file[51];
  115.     char flavor[2];
  116.     char sure[2];
  117. #endif
  118.  
  119. #ifndef MILQ
  120.     if (p != NULL)
  121.         {
  122.         r = p->region;
  123.  
  124.         /* First fill it all with blanks */
  125.         sb_fill (r, ' ', colors.popup);
  126.  
  127.         /* Now draw the box */
  128.         sb_box (r, boxtype, colors.popup);
  129.  
  130.         sb_move (r, 0, 1);
  131.         sb_puts (r, MSG_TXT(M_SEND_FILE));
  132.  
  133.         /* Now do the fields */
  134.         sb_move (r, 1,2);
  135.         sb_puts (r, MSG_TXT(M_ADDRESS_TO_SEND_TO));
  136.         if (!sb_input_chars (r, 1, 22, node, 47))
  137.             {
  138.             sb_move (r, 2, 2);
  139.             sb_puts (r, MSG_TXT(M_FILE_TO_SEND));
  140.             if (!sb_input_chars (r, 2, 22, file, 47))
  141.                 {
  142.                 sb_move (r, 3, 2);
  143.                 sb_puts (r, "Crash, Hold, Direct, Normal (C/H/D/N)?");
  144.                 (void) sb_input_chars (r, 3, 41, flavor, 1);
  145.                 sb_move (r, 4, 2);
  146.                 sb_puts (r, MSG_TXT(M_ARE_YOU_SURE));
  147.                 (void) sb_input_chars (r, 4, 22, sure, 1);
  148.                 if (sure[0] == (char)toupper (MSG_TXT(M_YES)[0]))
  149.                     x = add_send (node, file, flavor);
  150.                 }
  151.             }
  152.         }
  153. #else
  154.     DialogBox( MilqueRsrc, "Send", MilqueMailerWnd, SendDlgPrc );
  155. #endif
  156.  
  157.     /* Return value is never checked, just use x so lint and -W3 don't get mad */
  158.     return (x);
  159. }
  160.  
  161. int Overlay_Do_Kill (BINK_SAVEP p, int x)
  162. {
  163. #ifndef MILQ
  164.     REGIONP r;
  165.     char node[51];
  166.     char sure[2];
  167. #endif
  168.  
  169. #ifndef MILQ
  170.     if (p != NULL)
  171.         {
  172.         r = p->region;
  173.  
  174.         /* First fill it all with blanks */
  175.         sb_fill (r, ' ', colors.popup);
  176.  
  177.         /* Now draw the box */
  178.         sb_box (r, boxtype, colors.popup);
  179.  
  180.         sb_move (r, 0, 1);
  181.         sb_puts (r, MSG_TXT(M_KILL_MAIL));
  182.  
  183.         /* Now do the fields */
  184.         sb_move (r, 1,2);
  185.         sb_puts (r, MSG_TXT(M_ADDRESS_TO_KILL));
  186.         if (!sb_input_chars (r, 1, 19, node, 50))
  187.             {
  188.             sb_move (r, 2, 2);
  189.             sb_puts (r, MSG_TXT(M_KILL_ALL_MAIL));
  190.             sb_puts (r, MSG_TXT(M_ARE_YOU_SURE));
  191.             (void) sb_input_chars (r, 2, 38, sure, 1);
  192.             if (sure[0] == (char)toupper (MSG_TXT(M_YES)[0]))
  193.                 x = kill_node (node);
  194.             }
  195.         }
  196.  
  197.     /* Return value is never checked, just use x so lint and -W3 don't get mad */
  198.     return (x);
  199. #else
  200.     DialogBox( MilqueRsrc, (LPSTR)"Kill", MilqueMailerWnd, KillDlgPrc );
  201. #endif
  202. }
  203.  
  204. int Overlay_Do_Poll (BINK_SAVEP p, int x)
  205. {
  206. #ifndef MILQ
  207.     char node[51];
  208.     REGIONP r;
  209. #else
  210.     HDLG                hDlg;
  211.     HANDLE